package com.ghostbusters.danceathon.util;

import java.util.ArrayList;
import java.util.List;

public abstract class ListUtil {

	public static <T> List<T> from(T... items) {
		List<T> list = new ArrayList<T>();

		for (T item : items) {
			list.add(item);
		}

		return list;
	}

	public static <T> String implode(List<T> items, String glue) {
		return ArrayUtil.implode(items.toArray(), glue);
	}

	public static <T> List<String> explode(String str, String separator) {
		List<String> list = new ArrayList<String>();
		String[] arr = str.split(separator);
		for (String s : arr) {
			list.add(s);
		}
		return list;
	}
}
